

export const isApp = () => {
  let app = 'zlb';
  const ua = window.navigator.userAgent;
  if (ua.toLowerCase().includes('miniprogram/wx') ||
    window.__wxjs_environment === 'miniprogram') {
    app = 'wx';
  } else if (ua.match(/AlipayClient/i)) {
    // alert("是支付宝")
    app = 'zfb';
  }
  return app
}
// 手机类型
export const mobilePhoneType = () => {
  let ran = window.navigator.userAgent;
  let isAndroid = ran.indexOf('Android') > -1 || ran.indexOf('Linux') > -1;
  let isIOS = !!ran.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
  console.info(isAndroid, isIOS)
  return { isAndroid, isIOS }
}
